import 'dart:convert';

UserBean userBeanFromJson(String str) => UserBean.fromJson(json.decode(str));
String userBeanToJson(UserBean data) => json.encode(data.toJson());

class UserBean {
  UserBean({
    this.customerInfo,
    this.token,
  });

  UserBean.fromJson(dynamic json) {
    customerInfo = json['customerInfo'] != null
        ? CustomerInfo.fromJson(json['customerInfo'])
        : null;
    token = json['token'];
  }
  CustomerInfo? customerInfo;
  String? token;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    if (customerInfo != null) {
      map['customerInfo'] = customerInfo?.toJson();
    }
    map['token'] = token;
    return map;
  }
}

CustomerInfo customerInfoFromJson(String str) =>
    CustomerInfo.fromJson(json.decode(str));
String customerInfoToJson(CustomerInfo data) => json.encode(data.toJson());

class CustomerInfo {
  CustomerInfo({
    this.code,
    this.msg,
    this.offset,
    this.limit,
    this.customerId,
    this.nickName,
    this.telPhone,
    this.password,
    this.customerLevel,
    this.customerTag,
    this.customerAddress,
    this.avatar,
    this.sex,
    this.birthday,
    this.userMoney,
    this.userIntegral,
    this.createTime,
    this.updateTime,
    this.loginTime,
    this.loginIp,
    this.ifDisable,
    this.deviceRegistrationId,
  });

  CustomerInfo.fromJson(dynamic json) {
    code = json['code'];
    msg = json['msg'];
    offset = json['offset'];
    limit = json['limit'];
    customerId = json['customerId'];
    nickName = json['nickName'];
    telPhone = json['telPhone'];
    password = json['password'];
    customerLevel = json['customerLevel'];
    customerTag = json['customerTag'];
    customerAddress = json['customerAddress'];
    avatar = json['avatar'];
    sex = json['sex'];
    birthday = json['birthday'];
    userMoney = json['userMoney'];
    userIntegral = json['userIntegral'];
    createTime = json['createTime'];
    updateTime = json['updateTime'];
    loginTime = json['loginTime'];
    loginIp = json['loginIp'];
    ifDisable = json['ifDisable'];
    deviceRegistrationId = json['deviceRegistrationId'];
  }
  String? code;
  String? msg;
  num? offset;
  num? limit;
  String? customerId;
  String? nickName;
  String? telPhone;
  String? password;
  num? customerLevel;
  String? customerTag;
  String? customerAddress;
  String? avatar;
  String? sex;
  String? birthday;
  num? userMoney;
  num? userIntegral;
  String? createTime;
  String? updateTime;
  String? loginTime;
  String? loginIp;
  String? ifDisable;
  String? deviceRegistrationId;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['code'] = code;
    map['msg'] = msg;
    map['offset'] = offset;
    map['limit'] = limit;
    map['customerId'] = customerId;
    map['nickName'] = nickName;
    map['telPhone'] = telPhone;
    map['password'] = password;
    map['customerLevel'] = customerLevel;
    map['customerTag'] = customerTag;
    map['customerAddress'] = customerAddress;
    map['avatar'] = avatar;
    map['sex'] = sex;
    map['birthday'] = birthday;
    map['userMoney'] = userMoney;
    map['userIntegral'] = userIntegral;
    map['createTime'] = createTime;
    map['updateTime'] = updateTime;
    map['loginTime'] = loginTime;
    map['loginIp'] = loginIp;
    map['ifDisable'] = ifDisable;
    map['deviceRegistrationId'] = deviceRegistrationId;
    return map;
  }
}
